<!--标准尾-->
<footer class="foot">
    <div class="foot_center">Copyright©2014-2016 zyttb.com All Rights Reserved 中云通科技股份有限公司<br>
        粤ICP备14011508号-3 </div>
</footer>
<!--/标准尾-->
<script type="text/javascript" src="__SCRIPT__/jquery.zyt.min.js"></script>
<script type="text/javascript">
$.zyt.config({
    server: '{:C('SSO_SERVER')}',
    verifyToken: 'http://sso.zyttb.com/Login/verifyToken',
    clearToken: 'http://sso.zyttb.com/Login/clearToken',
    login: function(uid){
        $.ajax({
            type: 'post',
            url:  '/User/Login',
            data: {uid: uid},
            success: function(data){
                $('.userInfo_name').html('您好，'+data.user_name+'<br /><a href="javascript:;" id="logout">[注销]</a>');
                $('#tb_acc').html(data.user_tb);
                $('#cash_acc').html(data.user_ye);
                $('.user_account').show();
                $('#logout').click(function(){
                    $.zyt.logout();
                });
            }
        });
    },
    logout: function(){
        $.ajax({
            type: 'GET',
            url:'/User/Logout',
            success: function(){
                $('.userInfo_name').html('您好，<a href="{$login_url}">[登录]</a><a href="{$reg_url}">[注册]</a>');
                $('#tb_acc').html('0');
                $('#cash_acc').html('0');
                $('.user_account').hide();
            }
        })
    }
});

$.zyt.login();
$('#logout').click(function(){
    $.zyt.logout();
});
</script>
